﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Student_chkpaper : StudentPageBase
{
    protected int id = 0;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!string.IsNullOrEmpty(Request.QueryString["id"])) {
            if (!int.TryParse(Request.QueryString["id"].Trim(), out id)) {
                Response.Write("发生错误!");
                Response.End();
            }
        }
        if (!IsPostBack) {
            //获取我所在部门的当前考试卷子
            string SQL = "SELECT PaperID FROM Paper WHERE DepartmentID=" + isTheMe.DepartmentID.Trim() + " AND IsCurrExam=1";
            object obj = Exam.Core.DAL.DataProvider.GetSingle(SQL);
            if (null == obj || obj.ToString().Trim() == "0") {
                Response.Write("当前没有考试!");
                Response.End();
            }
            //查询考生考卷表是否存在该考卷
            string pid = obj.ToString().Trim();
            SQL = "SELECT Count(StudentPaperID) FROM StudentPaper WHERE StudentID=" + isTheMe.StudentID.Trim() + " AND PaperID=" + pid;
            obj = Exam.Core.DAL.DataProvider.GetSingle(SQL);
            if (null != obj) {

                if (obj.ToString().Trim() == "0") {
                    
                }
            }
        }
    }
}